home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Telnet 2.6.1d1 4⁄26⁄94 Folder / source / globaldefs.h < prev    next >
Text File  |  1993-11-01  |  4KB  |  134 lines

  1. /*
  2. *    globaldefs.h
  3. *    Defines we only want to define once...
  4. *
  5. *****************************************************************************
  6. *       NCSA Telnet for the Macintosh                                        *
  7. *                                                                            *
  8. *        National Center for Supercomputing Applications                        *
  9. *        152 Computing Applications Building                                    *
  10. *        605 E. Springfield Ave.                                                *
  11. *        Champaign, IL  61820                                                *
  12. *                                                                            *
  13. *        Copyright (c) 1992, Board of Trustees of the University of Illinois    *
  14. *                                                                            *
  15. *****************************************************************************
  16. *  Revisions:
  17. *  7/92        Telnet 2.6:    Initial version.  Jim Browne
  18. */
  19.  
  20. /*    Operation Governing Defines: */
  21. #define    MaxSess        20        /* The maximum number of sessions */
  22. #define    MaxGraph    30        /* Maximum number of graphics */
  23. #define NPORTS        30
  24. #define MAXVG        20        /* maximum number of VG windows */
  25. #define NEVENTS        50
  26.  
  27. /*    Possible values for windowKind */
  28. #define    WIN_MODELESS    userKind+1        // Modeless windows
  29. #define    WIN_CONSOLE        userKind+2        // Console window
  30. #define    WIN_LOG            userKind+3        // FTP log window
  31. #define    WIN_CNXN        userKind+4        // Connections
  32. #define    WIN_TEK            userKind+5        // TEK windows
  33. #define    WIN_ICRG        userKind+6        // Interactive Color Raster Graphics windows
  34.  
  35. /*    Emulation type defines */
  36. #define VTEKTYPE    1
  37. #define TEKTYPE        2
  38. #define DUMBTYPE    3
  39. #define RASTYPE        4
  40.  
  41. /*    Font Height and width constants */
  42. #define DefFONT        4
  43. #define DefSIZE        9
  44.  
  45. /*    ASCII character set defines */
  46. #define ESC            0x1b    /* the escape character */
  47. #define    BS            0x08    /* the backspace character */
  48. #define DEL            0x7f    /* the delete character */
  49. #define CR            0x0d    /* the carriage return character */
  50. #define LF            0x0a    /* the line feed character */
  51.  
  52.  
  53. /* Now for some event stuff */
  54. #define    BScode        51        /* This is the Keycode for Backspace */
  55. #define KPlowest    65        /* This is the last code before the KP */
  56. #define switchEvt     1        /* Switching event (suspend/resume )  for app4evt */
  57.  
  58. /* These next three keep track of the screen windows */
  59. #define NO_WINDOW    0
  60. #define DEC_WINDOW    1
  61. #define TEK_WINDOW    2
  62.  
  63. #define NUMCURS        7
  64. #define gincurs        0
  65. #define xfercurs    1
  66. #define normcurs    2
  67. #define textcurs    3
  68. #define poscurs        4
  69. #define watchcurs    5
  70. #define graphcurs    6
  71.  
  72. #define kInFront    (WindowPtr) -1
  73.  
  74. /* ===================================================================================*/
  75. struct TelInfoRec {
  76. short 
  77.     setdir,
  78.     SettingsFile,    /* The Resource Reference Number of the Settings file */
  79.     ApplicationFile,    // The Resource Reference Number of the Application file
  80.     MacBinary,        // Alternate instance that can allow us to change MB state w/o
  81.                     //    changing the actual preference value
  82.     ScrlLock,        /* Are we in network suspend mode */
  83.     ftplogon,        /* Is ftp log visible (default no) */
  84.     done,            /* Are we done yet 0=not */
  85.     numwindows,        /* Number of active window structures (note: not windows ) */
  86.     ginon,            /* True if we are in GIN mode */
  87.     xferon,            /* Is a transfer in progress */
  88.     graphs,            /* How many detached graphs do we have */
  89.     debug,            /* Flag for debugging 1=active */
  90.     myfronttype,    /* what kinda window is the front one */
  91.     suspended;        /* Are we in the air??? */
  92.     
  93. short
  94.     CONFstate,        /* ...for parsing config files */
  95.     CONFactive,
  96.     position,        /* the next three are state variables for config.tel parsing */
  97.     inquote,
  98.     lineno;           /* state vars */    
  99.  
  100. long
  101.     oldgraph[MaxGraph],    /* Storage for old Graph numbers */
  102.     myfrontvs,        /* what is the VS # of the window */
  103.     blinktime;
  104.             
  105. Rect
  106.     screenRect,        /* The whole screen */
  107.     dragRect;        /* Where it is legal to drag ourselves */
  108.  
  109. WindowPeek
  110.     myfrontwindow;    /* window pointer for changing the pointer */
  111.  
  112. RgnHandle
  113.     myfrontRgn;        /* Handle to the region of the window to scope for stuff */
  114.  
  115. Cursor
  116.     *lastCursor;
  117.  
  118. FSSpec
  119.     ApFolder, SysFolder, PrefFolder;
  120.  
  121. short    
  122.     DefaultDirVRefNum,
  123.     FTPClientVRefNum; 
  124.  
  125. long
  126.     DefaultDirDirID,
  127.     FTPClientDirID;
  128. };
  129.  
  130. typedef struct TelInfoRec TelInfoRec;
  131.  
  132. #ifndef GLOBALMASTER
  133. extern TelInfoRec *TelInfo;         /* all the globals related to Telnet internals */
  134. #endif